﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace mediatheque.Controllers
{
    public class FilmsController : Controller
    {
        private mediathequeEntities db = new mediathequeEntities();

        //
        // GET: /Films/

        public ActionResult Index()
        {
            var list = from g in db.oeuvres
                       where g.type == "dvd"
                       select g;

            if (list == null)
                return View("NotFound");
            else
                return View(list.ToList());
        }

        //
        // GET: /Films/Details/5

        public ActionResult Details(int id)
        {
            var u = db.oeuvres.First(i => i.id == id);
            if (u == null)
                return View("NotFound");
            else
                return View(u);
        }

    }
}
